package com.demo.lifeinfo.model;

import android.widget.ImageView;

import com.demo.lifeinfo.R;
import com.yanzhenjie.album.AlbumFile;
import com.yanzhenjie.album.AlbumLoader;

/**
 * created by Raymond
 * on 2019-04-26
 */
public class MediaLoader implements AlbumLoader {
    @Override
    public void load(ImageView imageView, AlbumFile albumFile) {
        load(imageView, albumFile.getPath());
    }

    @Override
    public void load(ImageView imageView, String url) {
        GlideApp.with(imageView.getContext())
                .load(url)
                .centerCrop()
                .placeholder(R.drawable.img_wait)
                .error(R.drawable.img_fail)
                .into(imageView);
    }
}
